package com.ipay.result;

import java.io.Serializable;

/**
 * @author ：前世小和尚（xiaopingzhang8@creditease.cn）
 * @Description ：错误信息封装
 * @ClassName ：ErrorMsg
 * @Company ：普信恒业科技发展（北京）有限公司
 * @date ：2018/4/8 14:23
 */
public class ErrorMsg<T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private String code;
    private String desc;
    private String url;
    private T data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public enum ResultCode implements Serializable {

        OK("2000", "SUCCESS"),
        ERROR("1000", "FAIL");

        private String code;
        private String desc;

        ResultCode(String code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public String getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

}
